package org.leetcode.easy.leetcode647;

import java.util.Arrays;

public class Solution {
    public int findLengthOfLCIS(int[] nums) {

        int maxLength = 1;
        int n = nums.length;

        int [] dp = new int[n];

        Arrays.fill(dp,1);

        for (int i = 1; i < n; i++) {
            if (nums[i]>nums[i-1]){
                dp[i]=dp[i-1]+1;
            }
            maxLength=Math.max(maxLength,dp[i]);
        }

        return maxLength;
    }
}
